package net.llz.mapper;

import net.llz.model.CouponRecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.llz.model.CouponTaskDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Let-凡
 * @since 2023-01-15
 */
public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {
    /**
     * 批量更新优惠卷使用记录
     * @param id
     * @param name
     * @param lockCouponRecordIds
     * @return
     */
    int lockUseStateBatch(@Param("userId") Long userid, @Param("useState") String useState, @Param("lockCouponRecordIds") List<Long> lockCouponRecordIds);


    /**
     * 更新优惠卷使用记录
     * @param couponRecordId
     * @param name
     */
    void updateState(@Param("couponRecordId") Long couponRecordId, @Param("useState") String useState);
}
